/**
 * Created by sunyxq on 16/3/26.
 */
angular.module('hyt.router',[])

    .config(function($stateProvider,$urlRouterProvider,$ionicConfigProvider){

        //tabs样式
        $ionicConfigProvider.platform.ios.tabs.style('standard');
        $ionicConfigProvider.platform.ios.tabs.position('bottom');
        $ionicConfigProvider.platform.android.tabs.style('standard');
        $ionicConfigProvider.platform.android.tabs.position('bottom');

        //导航标题样式
        $ionicConfigProvider.platform.ios.navBar.alignTitle('center');
        $ionicConfigProvider.platform.android.navBar.alignTitle('center');

        //返回按钮样式
        $ionicConfigProvider.platform.ios.backButton.previousTitleText('').icon('ion-ios-arrow-thin-left');
        $ionicConfigProvider.platform.android.backButton.previousTitleText('').icon('ion-android-arrow-back');

        //视图样式
        $ionicConfigProvider.platform.ios.views.transition('ios');
        $ionicConfigProvider.platform.android.views.transition('android');

        $stateProvider

        //用户登录
            .state('login', {
                cache:false,
                url: '/login/:lxdh',
                templateUrl: "templates/user/login.html",
                controller:"LoginCtrl"
            })
            //验证手机号
            .state('verification', {
                cache:false,
                url: '/verification/:sjhm/:sfwlgs',
                templateUrl: "templates/user/verification.html",
                controller:"VerificationCtrl"
            })

            //用户注册
            .state('regist', {
                cache:false,
                url: '/regist',
                templateUrl: "templates/user/regist.html",
                controller:"RegistCtrl"
            })

            //忘记密码
            .state('forgetpwd', {
                cache:false,
                url: '/forgetPwd',
                templateUrl: "templates/user/forgetPwd.html",
                controller:"ForgetPwdCtrl"
            })

            //个人设置
            .state('settings',{
                cache:false,
                url : '/settings',
                templateUrl : "templates/user/settings.html",
                controller:"SettingCtrl"
            })
            //修改密码
            .state('changepwd', {
                cache:false,
                url: '/changePwd',
                templateUrl: "templates/user/changePwd.html",
                controller:"ChangePwdCtrl"
            })

            //添加打印机
            .state('addPrinter',{
                url : '/addPrinter',
                templateUrl : "templates/user/addPrinter.html",
                controller:"AddPrinterCtrl"
            })

            //关注物流公司
            .state('focusWlgs',{
                url : '/focusWlgs',
                templateUrl : "templates/user/focusWlgs.html"
            })
            //关于我们
            .state('aboutUs',{
                url : '/aboutUs',
                templateUrl : "templates/user/aboutUs.html",
                controller:"SettingCtrl"
            })
            //意见反馈
            .state('feedback',{
                cache:false,
                url : '/feedback',
                templateUrl : "templates/user/feedback.html",
                controller : "FeedbackCtrl"
            })
            //主菜单
            .state('menu',{
                cache:false,
                url : '/menu',
                templateUrl : "templates/menu.html",
                controller : "MenuListCtrl"
            })

            //发货开单
            .state('addcyd',{
                cache:false,
                url : '/addcyd/:mc/:khmc/:lxdh/:sflx',
                templateUrl : 'templates/manageKaiDan/cydAdd.html',
                controller : "AddCydCtrl"
            })
            //包装列表
            .state('chooseBz',{
                url : '/chooseBz/:bzlx',
                templateUrl : 'templates/manageKaiDan/baozhuangList.html',
                controller : "AddCydCtrl"
            })
            //筛选包装
            .state('bzSearch',{
                cache:false,
                url:'/searchBz',
                templateUrl:'templates/manageKaiDan/searchBz.html',
                controller : "AddCydCtrl"
            })

            //运单查询列表
            .state('cydlist',{
                cache:false,
                url : '/cydlist/:cydh/:kssj/:jssj/:fhrmc/:fhrdh/:shrdh/:cyzt/:shbm',
                templateUrl : 'templates/manageYunDan/cydList.html',
                controller : "CydListCtrl"
            })
            //运单查询列表
            .state('cydmenulist',{
                url : '/cydmenulist',
                templateUrl : 'templates/manageYunDan/cydmenulist.html',
                controller : "CydListCtrl"
            })
            //承运单详情
            .state('cydtab', {
                cache:false,
                url: '/cydtab/:cyd_id',
                templateUrl: 'templates/manageYunDan/cydDetailTab.html',
                controller : "CydDetailCtrl"
            })

            //修改承运单
            .state('cydChange',{
                cache:false,
                url : '/cydChange/:cyd_id/:mc/:khmc/:lxdh/:sflx',
                templateUrl : 'templates/manageYunDan/cydChange.html',
                controller : "CydChangeCtrl"
            })
            //包装列表
            .state('changeBz',{
                url : '/changeBz/:bzlx',
                templateUrl : 'templates/manageYunDan/changeBzList.html',
                controller : "CydChangeCtrl"
            })
            //筛选包装
            .state('changeBzSearch',{
                cache:false,
                url:'/searchChangeBz',
                templateUrl:'templates/manageYunDan/searchChangeBz.html',
                controller : "CydChangeCtrl"
            })

            //查询运单
            .state('cydSearch',{
                url : '/cydSearch/:khmc/:lxdh/:sflx',
                templateUrl : 'templates/manageYunDan/cydSearch.html',
                controller : 'CydSearchCtrl'
            })
            //货主查询运单
            .state('hzcydsearch',{
                url : '/hzCydSearch',
                templateUrl : 'templates/huozhuYunDan/hzCydSearch.html',
                controller : 'HzCydSearchCtrl'
            })
            //货主运单查询列表
            .state('hzcydlist',{
                cache:false,
                url : '/hzCydlist/:cydh/:kssj/:jssj/:shrdh/:shrmc/:fhdzt',
                templateUrl : 'templates/huozhuYunDan/hzCydList.html',
                controller : "HzCydListCtrl"
            })
            //货主承运单详情
            .state('hzcydtab', {
                cache:false,
                url: '/hzCydtab/:fhd_id/:cyd_id',
                templateUrl: 'templates/huozhuYunDan/hzCydDetailTab.html',
                controller : "HzCydDetailCtrl"
            })
            .state('hzFhdDetail', {
                cache:false,
                url: '/hzFhdDetail/:fhd_id',
                templateUrl: 'templates/huozhuYunDan/hzFhdDetail.html',
                controller : "HzCydDetailCtrl"
            })
           //到站签收列表
            .state('dzreceiptlist',{
                cache:false,
                url : '/dzreceiptlist',
                templateUrl : 'templates/receiptDaoZhan/daoZhanReceiptList.html',
                controller : "DaoZhanReceiptListCtrl"
            })

            //到站签收详情
            .state('dzdetail',{
                cache:false,
                url : '/dzdetail/:id/:cydh',
                templateUrl : 'templates/receiptDaoZhan/daoZhanDetailReceipt.html',
                controller : "DaoZhanDetailReceiptCtrl"
            })
            //到站签收详情查询
            .state('dzdetailSearch',{
                cache:false,
                url : '/dzdetailSearch/:id',
                templateUrl : 'templates/receiptDaoZhan/daoZhanCydSearch.html',
                controller : "DaoZhanDetailReceiptCtrl"
            })
            //货损登记详情
            .state('hsdjdetail',{
                cache:false,
                url:'/hsdjdetail/:cyd_id',
                templateUrl:'templates/receiptDaoZhan/hsdjDetail.html',
                controller : "HsdjDetailCtrl"
            })

            //到站签收查询
            .state('dzSearch',{
                cache:false,
                url : '/dzSearch/:cl_id/:cph/:bmmc',
                templateUrl : 'templates/receiptDaoZhan/daoZhanReceiptSearch.html',
                controller : "DaoZhanSearchCtrl"
            })
            //车辆列表
            .state('carlist',{
                url : '/carlist/:cph/:bmmc',
                templateUrl : 'templates/receiptDaoZhan/carList.html',
                controller : "CphListCtrl"
            })
            //车辆查询
            .state('carSearch',{
                cache:false,
                url:'/searchCph',
                templateUrl:'templates/receiptDaoZhan/searchCph.html',
                controller : "SearchCphCtrl"
            })
            //到站签收筛选列表
            .state('dzreceiptresult',{
                url : '/dzreceiptresult/:cph/:sfz/:kssj/:jssj',
                templateUrl : 'templates/receiptDaoZhan/daoZhanSearchResult.html',
                controller : "DaoZhanReceiptListCtrl"
            })
            //站点对账
            .state('searchzddz',{
                url : '/serachzddz',
                templateUrl : 'templates/zhandianduizhang/searchZddz.html',
                controller : "SearchZddzCtrl"
            })

            //站点对账列表
            .state('zddzlist',{
                cache:false,
                url : '/zddzlist/:ddz/:kssj/:jssj/:dw_id/:ddzmc',
                templateUrl : 'templates/zhandianduizhang/zddzList.html',
                controller : "ZddzListCtrl"
            })
            //客户对账
            .state('searchkhdz',{
                url : '/serachkhdz/:khmc/:lxdh',
                templateUrl : 'templates/kehuduizhang/searchKhdz.html',
                controller : "SearchKhdzCtrl"
            })
            //客户对账列表
            .state('khdzlist',{
                cache:false,
                url : '/khdzlist/:khmc/:khdh/:kssj/:jssj',
                templateUrl : 'templates/kehuduizhang/khdzList.html',
                controller : "KhdzListCtrl"
            })

            //合作伙伴对账
            .state('searchPartnerdz',{
                url : '/searchPartnerdz/:gsmc/:gsdh',
                templateUrl : 'templates/partnerduizhang/searchPartnerdz.html',
                controller : "SearchPartnerdzCtrl"
            })
            //合作伙伴对账列表
            .state('partnerdzlist',{
                cache:false,
                url : '/partnerdzlist/:gsmc/:gsdh/:kssj/:jssj',
                templateUrl : 'templates/partnerduizhang/partnerdzList.html',
                controller : "PartnerdzListCtrl"
            })
            //选择合作伙伴
            .state('partner',{
                cache:false,
                url:'/partner',
                templateUrl:'templates/partnerduizhang/partner.html',
                controller : "PartnerCtrl"
            })
           //客户签收(收货人签收)
            .state('shrlist',{
                cache:false,
                url : '/shrList/:cydh/:kssj/:jssj/:fhrmc/:fhrdh/:shrdh',
                templateUrl : 'templates/receiptCustomer/shrList.html',
                controller : "ShrListCtrl"
            })

            //客户运单查询(收货人签收)
            .state('shrlistsearch',{
                cache:false,
                url : '/shrlistsearch/:khmc/:lxdh',
                templateUrl : 'templates/receiptCustomer/shrListSearch.html',
                controller : "ShrListSearchCtrl"
            })

            //客户查询结果(收货人签收)
            .state('shrsearchresult',{
                cache:false,
                url : '/shrSearchResult/:cydh/:shrmc/:shrdh',
                templateUrl : 'templates/receiptCustomer/shrSearchResult.html',
                controller : "ShrSearchResultCtrl"
            })
            //线路列表
            .state('xllist',{
                cache:false,
                url : '/xllist/:xlmc',
                templateUrl : 'templates/findXianLu/xianLuFind.html',
                controller : "XlListCtrl"
            })
            //线路查询
            .state('searchXl',{
                url : '/searchXl',
                templateUrl : 'templates/findXianLu/searchXl.html',
                controller : "XlSearchCtrl"
            })
            //客户签收详情
            .state('shrqsdetail',{
                cache:false,
                url:'/shrqsdetail/:cyd_id/:shrmc:/:shrdh/:qssl/:cylx/:mdd',
                templateUrl:'templates/receiptCustomer/shrQsDetail.html',
                controller:'ShrQsDetailCtrl'
            })
            //客户拒收详情
            .state('shrjsdetail',{
                cache:false,
                url:'/shrjsdetail/:cyd_id/:cylx/:mdd',
                templateUrl:'templates/receiptCustomer/shrJsDetail.html',
                controller : "ShrJsDetailCtrl"
            })
            //车辆查询
            .state('cheliangSearch',{
                cache:false,
                url:'/searchCl',
                templateUrl:'templates/cheliangchaxun/searchCl.html',
                controller : "SearchCphCtrl"
            })
            //车辆查询装车单列表
            .state('zcdlist',{
                cache:false,
                url : '/zcdlist/:cl_id/:cph',
                templateUrl : 'templates/cheliangchaxun/zcdList.html',
                controller : "ZcdListCtrl"
            })
            //车辆定位
            .state('GPSLocation',{
                url : '/GPSLocation/:cl_id',
                templateUrl : 'templates/cheliangchaxun/GPSLocation.html',
                controller : "ClGPSCtrl"
            })
            //车辆查询承运单列表
            .state('clcxlist',{
                cache:false,
                url : '/clcxlist/:id/:cph',
                templateUrl : 'templates/cheliangchaxun/searchList.html',
                controller : "ClcxListCtrl"
            })
            //车辆列表
            .state('chelianglist',{
                url : '/chelianglist/:cph/:xl/:clyxzt',
                templateUrl : 'templates/cheliangchaxun/cheliangList.html',
                controller : "CphListCtrl"
            })

            //扫码签收
            .state('scanCode',{
                cache:false,
                url : '/scanCode/:cph/:sfz/:kssj/:jssj',
                templateUrl : 'templates/scanCode/scanCode.html',
                controller :"ScanCodeListCtrl"
            })
            //扫码签收筛选
            .state('scanCodeSearch',{
                url : '/scanCodeSearch/:cl_id/:cph',
                templateUrl : 'templates/scanCode/scanCodeSearch.html',
                controller :"ScanCodeSearchCtrl"
            })
            .state('scanCarList',{
                url : '/scanCarList/:cph',
                templateUrl : 'templates/scanCode/scanCarList.html',
                controller : "CphListCtrl"
            })
            .state('scanSearchCph',{
                cache:false,
                url:'/scanSearchCph',
                templateUrl:'templates/scanCode/scanSearchCph.html',
                controller : "SearchCphCtrl"
            })
            //选择联系人
            .state('linkman',{
                cache:false,
                url:'/linkman/:htmlbs/:sflx',
                templateUrl:'templates/user/linkman.html',
                controller : "LinkmanCtrl"
            })
            //通讯录
            .state('mailList',{
                cache:false,
                url:'/mailList',
                templateUrl:'templates/mailList/mailListTab.html',
                controller : "MailListCtrl"
            })

            //我要发货
            .state('hzKaiDan',{
                cache:false,
                url:'/hzKaiDan/:khmc/:lxdh/:address',
                templateUrl:'templates/huozhuKaiDan/hzKaiDan.html',
                controller : "HzKaiDanCtrl"
            })

            //补单
            .state('hzBuDan',{
                cache:false,
                url:'/hzBuDan/:khmc/:lxdh/:address',
                templateUrl:'templates/huozhuKaiDan/cydBuDan.html',
                controller : "HzBuDanCtrl"
            })
            //选择物流公司
            .state('company',{
                cache:false,
                url:'/company/:fhd_id/:fhrdh/:fhrCity',
                templateUrl:'templates/huozhuKaiDan/company.html',
                controller : "ChooseWlgsCtrl"
            })
            .state('moreCompany',{
                cache:false,
                url:'/company',
                templateUrl:'templates/huozhuKaiDan/moreCompany.html',
                controller : "ChooseWlgsCtrl"
            })
            //选择收货人
            .state('hzShrList',{
                cache:false,
                url:'/hzShrList/:htmlbs/:fhd_id',
                templateUrl:'templates/huozhuKaiDan/hzShrList.html',
                controller : "HzShrListCtrl"
            })
            //修改发货单
            .state('hzChangeDan',{
                cache:false,
                url:'/hzChangeDan/:fhd_id/:khmc/:lxdh/:address',
                templateUrl:'templates/huozhuYunDan/hzChangeDan.html',
                controller : "HzChangeDanCtrl"
            })
            //修改补单
            .state('changeBuDan',{
                cache:false,
                url:'/changeBuDan/:fhd_id/:khmc/:lxdh/:address',
                templateUrl:'templates/huozhuYunDan/changeBuDan.html',
                controller : "ChangeBuDanCtrl"
            })
            .state('chooseZd',{
                cache:false,
                url:'/chooseZd',
                templateUrl:'templates/huozhuduizhang/chooseZd.html',
                controller : "ChooseWlgsCtrl"
            })
            .state('hzdzList',{
                cache:false,
                url:'/hzdzList/:dw_id/:zd_id',
                templateUrl:'templates/huozhuduizhang/hzdzList.html',
                controller : "HzDuizhangCtrl"
            })
            //通讯录
            .state('hzMailList',{
                cache:false,
                url:'/hzMailList',
                templateUrl:'templates/mailList/hzMailList.html',
            })
        ;
    })
